<template>
  <div class="app-container">
    <el-form ref="submitParams" :model="submitParams" :rules="rules" label-width="160px">
      <el-row type="flex">
        <el-col :offset="5" :span="12">
          <el-form-item label="发送方式：" prop="paraValue">
            <el-select style="width: 100%" v-model="submitParams.paraValue" placeholder="">
              <el-option
                v-for="dict in dictMap.SEND_TYPE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="submitForm" :loading="isLoading">提交</el-button>
      <el-button type="warning" @click="refresh" :loading="isLoading">重置</el-button>
    </div>
  </div>
</template>

<script>
import { submit } from "@/api/cnaps/bizMng/hvps_send_way_maintain.js";
import { listPageMixin } from "@/libs/listPageMixin";
export default {
  name: "HvpsSendWayMaintain",
  mixins: [listPageMixin],
  components: {},
  computed: {},
  data() {
    return {
      isLoading: false,
      // 录入参数
      submitParams: {
        paraValue: "0",
      },
      searchFormDictList: ["SEND_TYPE"],
      rules: {
        paraValue: [{ required: true, message: "不能为空", trigger: "change" }],
      },
    };
  },
  mounted() {},
  methods: {
    /** 提交按钮 */
    submitForm() {
      this.loading = true;
      submit(this.submitParams)
        .then(() => {
          this.msgSuccess("成功");
          this.loading = false;
        })
        .catch(() => {
          this.loading = false;
        });
    },
    //点击重置按钮
    refresh() {
      this.resetForm("submitParams");
    },
  },
};
</script>
<style>
.dialog-footer {
  margin: 10px 0;
  text-align: center;
}
</style>
